import java.util.Scanner;

public class T {
	public static void main(String[] args) {
		long startTime=System.nanoTime();  
		int[] a = {7,1,3,5,8,4,9};
		for (int i = 0; i<a.length; i++) {
			for (int j = i; j<a.length-1;j++  ) {
				int temp = 0;
				if (a[j]>a[j+1]) {
					temp = a[j];
					a[j] = a[j+1];
					a[j+1] = temp;
				}
			}
		}
		for (int x : a) {
			System.out.print(x+" ");
		}
		
		
		
		long endTime=System.nanoTime();
		System.out.println("程序运行时间： "+(endTime-startTime)/1000+"um"); 
	}
}